package pbx.model;

import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

//COPY public.cdr FROM '/root/Master.csv' DELIMITER ',' CSV;
//select uniqueid, count(*) from public.cdr  group by uniqueid having count(*) > 1
//update public.cdr set uniqueid = nextval('cdr_id_seq');

@Entity
@Table(name = "cdr", schema="public")
public class Cdr{

	@Id
	private String uniqueid;
	private String accountcode;
	private String src;
	private String dst;
	private String dcontext;
	private String clid;
	@Temporal(TemporalType.TIMESTAMP)
	private Date answer;
	private Double duration;
	private Double billsec;
	private String disposition;
	private String amaflags;
	private String channel;
	private String dstchannel;
	private String lastapp;
	private String lastdata;
	private String calldate;
	private String userfield;
	
	private Boolean billed;
	private Boolean monitored;
	
	private Integer version;

		
	public String getAccountcode() {
		return accountcode;
	}
	public void setAccountcode(String accountcode) {
		this.accountcode = accountcode;
	}
	public String getUniqueid() {
		return uniqueid;
	}
	public void setUniqueid(String uniqueid) {
		this.uniqueid = uniqueid;
	}
	public String getSrc() {
		return src;
	}
	public void setSrc(String src) {
		this.src = src;
	}
	public String getDst() {
		return dst;
	}
	public void setDst(String dst) {
		this.dst = dst;
	}
	public String getDcontext() {
		return dcontext;
	}
	public void setDcontext(String dcontext) {
		this.dcontext = dcontext;
	}
	public String getClid() {
		return clid;
	}
	public void setClid(String clid) {
		this.clid = clid;
	}
	public Date getAnswer() {
		return answer;
	}
	public void setAnswer(Date answer) {
		this.answer = answer;
	}
	public Double getDuration() {
		return duration;
	}
	public void setDuration(Double duration) {
		this.duration = duration;
	}
	public Double getBillsec() {
		return billsec;
	}
	public void setBillsec(Double billsec) {
		this.billsec = billsec;
	}
	public String getDisposition() {
		return disposition;
	}
	public void setDisposition(String disposition) {
		this.disposition = disposition;
	}
	public Boolean getBilled() {
		return billed;
	}
	public void setBilled(Boolean billed) {
		this.billed = billed;
	}
	public String getAmaflags() {
		return amaflags;
	}
	public void setAmaflags(String amaflags) {
		this.amaflags = amaflags;
	}
	public String getChannel() {
		return channel;
	}
	public void setChannel(String channel) {
		this.channel = channel;
	}
	public String getDstchannel() {
		return dstchannel;
	}
	public void setDstchannel(String dstchannel) {
		this.dstchannel = dstchannel;
	}
	public String getLastapp() {
		return lastapp;
	}
	public void setLastapp(String lastapp) {
		this.lastapp = lastapp;
	}
	public String getLastdata() {
		return lastdata;
	}
	public void setLastdata(String lastdata) {
		this.lastdata = lastdata;
	}
	public String getCalldate() {
		return calldate;
	}
	public void setCalldate(String calldate) {
		this.calldate = calldate;
	}
	public Boolean getMonitored() {
		return monitored;
	}
	public void setMonitored(Boolean monitored) {
		this.monitored = monitored;
	}
	public String getUserfield() {
		return userfield;
	}
	public void setUserfield(String userfield) {
		this.userfield = userfield;
	}
	public Integer getVersion() {
		return version;
	}
	public void setVersion(Integer version) {
		this.version = version;
	}
	
	

}
